const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  css: {
    loaderOptions: {
      less: {
        lessOptions: {
          // If you are using less-loader@5 please spread the lessOptions to options directly
          modifyVars: {
            'font-size-base': '18px',
            'input-height-base': '38px',
            'primary-color': '#2377ff'
          },
          javascriptEnabled: true
        }
      }
    }
  },
  pluginOptions: {
    electronBuilder: {
      customFileProtocol: './',
      builderOptions: {
        appId: 'pub.emesh.dev',
        productName: '巡视巡察数据填报系统',
        directories: {
          buildResources: 'build'
        },
        extraFiles: ['./dbson', './public'],
        mac: {
          category: 'public.app-category.utilities'
        },
        dmg: {
          icon: 'build/icon.icns',
          iconSize: 100,
          contents: [
            {
              x: 380,
              y: 180,
              type: 'link',
              path: '/Applications'
            },
            {
              x: 130,
              y: 180,
              type: 'file'
            }
          ],
          window: {
            width: 540,
            height: 380
          }
        },
        win: {
          icon: 'public/icons/logo.png',
          target: [
            {
              target: 'nsis',
              arch: [
                'x64'
              ]
            }
          ]
        },
        linux: {
          icon: './public/icons/logo.png',
          artifactName: '巡视巡察数据填报系统.deb',
          extraFiles: ['./dbson', './public'],
          desktop: {
            Icon: './public/icons/logo.png'
          },
          category: 'Education',
          target: 'deb'
        },
        nsis: {
          oneClick: false,
          perMachine: true,
          allowElevation: true,
          allowToChangeInstallationDirectory: true,
          createDesktopShortcut: true,
          createStartMenuShortcut: true
        }
      },
      nodeIntegration: true
    }
  }

})
